#ifndef _TWOGRE_VARIABLE_H_
#define _TWOGRE_VARIABLE_H_

#include "TwOgrePrerequisites.h"

#include "OgreString.h"

namespace TwOgre{
	class Window;
    /**
	 * Variable.
	 * This is used as the base class for all specific Variable types.
	 */
	class TwOgreExport Variable
	{
	protected:
		/**
		 * Constructor.
		 * @param parent Pointer to the parent Window.
		 * @param name Name used to refer to the variable, but be unique for this Window.
		 * @param type AntTweakBar type used to determine which Variable was made.
		 *
		 * @note This constructor should never be called directly, instead all Variables 
		 * should be created through their parent Windows.
		 */
		Variable(Window *parent, const Ogre::String& name, TwType type) :
			 mParent(parent), mName(name), mVarType(type) {}
        /** Destructor */
		virtual ~Variable() {}

		/** Return the AntTweakBar type of this Variable so the parent Window can determine the type of varible this is. */
		TwType getType() const {return mVarType;}

	public:
		/** Sets the label of the Variable in the Window. */
		void setLabel(const Ogre::String& label);
		/** Sets the string that describes the Variable in the Help Window. */
		void setHelp(const Ogre::String& help);
		/** Sets the group that the Variable belongs to. */
		void setGroup(const Ogre::String& group);

		/** Returns the name of the Variable. */
		const Ogre::String& getName() const {return mName;}

		/** Shows the Variable. */
		void show();
		/** Hides the Variable. */
		void hide();

	protected:
		Ogre::String mName;
		Window *mParent;
		TwType mVarType;

		friend class Window;
		friend class WindowManager;
	};

}; // End Namespace
#endif
